<template>
  <div>
    {{ $t('homePage') }}
    <el-carousel :interval="3000" type="card" height="400px">
      <el-carousel-item v-for="item in 4" :key="item">
        <h3 :class="['medium', `carousel${item}`]"></h3>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>
<script>
export default {
  name: 'homePage',
}
</script>
<style lang="scss" scoped>
.el-carousel__item h3 {
  color: #475669;
  height: 100%;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
.medium {
  background-size: 100% 100%;
}
$pgs: 1, 2, 3, 4;
@each $i in $pgs {
  .carousel#{$i} {
    background-image: url('../../assets/imgs/homePage/carousel' + #{$i} + '.jpg');
  }
}
</style>
